home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / SOUND-2.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  856b  |  28 lines

  1. ' SOUND-2.BAS
  2. ' This program demonstrates how to play a song in BASIC.
  3.  
  4. CLS
  5.  
  6. INPUT "Press Enter to begin...", dummy$
  7.  
  8. FOR i% = 1 TO 34
  9.     READ note%, duration%
  10.     SOUND note%, duration%
  11. NEXT i%
  12.  
  13. '    My       bon-     nie      lies     o-       ver      the
  14. DATA 392, 8,  659, 8,  587, 8,  523, 8,  587, 8,  523, 8,  440, 8
  15.  
  16. '    o-       cean,    My       bon-     nie      lies
  17. DATA 392, 8,  330, 32, 392, 8,  659, 8,  587, 8,  523, 8
  18.  
  19. '    o-       ver      the      sea;     My       bon-     nie
  20. DATA 523, 8,  494, 8,  523, 8,  587, 40, 392, 8,  659, 8,  587, 8
  21.  
  22. '    lies     o-       ver      the      o-       cean--   O
  23. DATA 523, 8,  587, 8,  523, 8,  440, 8,  392, 8,  330, 32, 392, 8
  24.  
  25. '    bring    back     my       bon-     nie      to       me!
  26. DATA 440, 8,  587, 8,  523, 8,  494, 8,  440, 8,  494, 8,  523, 32
  27.  
  28.